-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building reproducible #1540
Conversation
Should fix reproducibility which currently may vary in between builds in the order the files are discovered in the file system.
docs/scripts/scan_examples.c
Outdated
@@ -81,9 +90,13 @@ int main(int argc, char* argv[]) | |||
lookup = calloc(argc, sizeof(lookup_t)); | |||
for (j = 0; j < argc; ++j) { | |||
lookup[j].index = j; | |||
int len = strlen(argv[j]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lookup[j].filename = strdup(argv[j]);
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just store the argv[i]
pointer, no need to make a copy of the string it points to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SiegeLord That seems very reasonable yes - and I have tested your method too now @pedro-w - that seems even better. I'll push to my branch here using this instead. Thanks!
Thanks, this is great work. I suggested some possible simplifications (the |
docs/scripts/scan_examples.c
Outdated
} lookup_t; | ||
static lookup_t *lookup; | ||
static int number_of_items = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this anymore.
Thanks again! |
The allegro-doc package doesn't build reproducible - these commits fix the "Last updated:" message on each html page by using the SOURCE_DATE_EPOCH build timestamp (more info here: https://reproducible-builds.org/docs/source-date-epoch/ ) and the other commit fix sorting example documents which are referenced alongside functions.
Original bug report in Debian here: https://bugs.debian.org/1064648 with links to more information regarding the problem.
https://reproducible-builds.org